The sample of the spawn()-function illustrates how a child process can be spawned by a parent
process. It also shows how to:

  * create a inter process communication link with the pipe()-function
  * inherit file descriptors from the parent process
  * pass arguments to the child process
  * set environment variables for the child process
  * exchange messages through the inter process communication link

The sample is run by calling the SPAWNR1 program. SPAWNR1 will send message back to the caller
that will be shown in the message subfile at the bottom of the command line. SPAWNR2 (child process)
will send messages to the message queue of the user profile.

E-mail:   thomas.raddatz@tools400.de
Homepage: http://www.tools400.de

The following APIs are used by the spawn()-sample:

  * putenv()   -- Change or Add Environment Variable
  * getenv()   -- Get Value of Environment Variable
  * pipe()     -- Create an Interprocess Channel
  * recv()     -- Receive Data
  * send()     -- Send Data
  * close()    -- Close File or Socket Descriptor
  * select()   -- Wait for Events on Multiple Sockets
  * spawn()    -- Spawn Process
  * waitpid()  -- Wait for Specific Child Process
  * __errno    -- Set Pointer to Runtime Error Message
  * strerror() -- Set Pointer to Runtime Error Message String
  * mitime()   -- Function to form an AS/400 system value for time
  * waittime() -- Wait on Time
  * strtok     -- Tokenize String
  * atoi       -- Convert Character String to Integer
  * QUSROBJD   -- Retrieve Object Description (QUSROBJD) API
  * CEETSTA    -- Test for Omitted Argument (CEETSTA) API
  * QMHSNDPM   -- Send Program Message (QMHSNDPM) API

